#ifndef LOK2CHATINPUT_H
#define LOK2CHATINPUT_H

#include "SDLTextBox.h"
#include "LOK2ChatMessageHandler.h"
#include "structs.h"

class LOK2ChatMessageHandler;

class LOK2ChatInput : public SDLTextBox {
public:
	LOK2ChatInput();
	LOK2ChatInput(SDL_Surface *_screen, TTF_Font *_font, SDL_Color _textColor, SDL_Event *_event, SDLClipboard *_pClipboard,
		LOK2ChatMessageHandler *pChatMsgHandler, const char *bgFileName = 0, int _max_len = 256);
	//~LOK2ChatInput();

	void inputHandler();
	void display();
	SDL_Rect getRect();
	int findCharXY(int x, int y);
	void doHighlight();
	bool sendChatMessage(std::string userName, std::string message, bool command);
	void doAction(int handle, int message);
private:
	LOK2ChatMessageHandler *m_pChatMsgHandler;
};

extern Uint32 (*pToggleCaret)(Uint32 interval, void *oTextBox);

#endif